#-------------------------------------------------
#
# Project created by QtCreator 2012-09-13T07:01:12
#
#-------------------------------------------------

QT       += core
QT       += network
QT       += sql
QT       -= gui


TARGET = TL2GServer
CONFIG   += console
CONFIG   -= app_bundle
TARGETORI = TL2Server

TEMPLATE = app
LIBS += -lQCryptopp

CONFIG(release, debug|release) {
    DESTDIR += release
} else {
    DESTDIR += debug
}

#for Windows
win32 {
#   Windows without bash
#   copyfiles.commands += @echo COPYING ADDITIONAL FILE/s &
#   copyfiles.commands += @call copy ..\\$${TARGET}\\TL2Server.conf $${DESTDIR}\\TL2Server.conf
#   Windows with bash
    copyfiles.commands += @echo COPYING ADDITIONAL FILE/s &
    copyfiles.commands += cp ../TL2Server.conf $${DESTDIR}/TL2Server.conf
}
linux {
#   Linux
    copyfiles.commands += @echo COPYING ADDITIONAL FILE/s &
    copyfiles.commands += cp ../TL2Server.conf $${DESTDIR}/TL2Server.conf
}

QMAKE_EXTRA_TARGETS += copyfiles
POST_TARGETDEPS += copyfiles

SOURCES += GServer.cpp \
    handlers/sessionhandler.cpp \
    database/dataserver.cpp \
    network/tlpacket.cpp \
    units/player.cpp \
    units/game.cpp \
    utils/logger.cpp \
    utils/ccreader.cpp \
    ccmd/commandmanager.cpp \
    crypto/loginhelper.cpp \
    crypto/zlibhelper.cpp \
    server/udpsever.cpp \
    server/logonserver.cpp \
    server/clientsocket.cpp \
    utils/configfile.cpp \
    shared/common.cpp

HEADERS += \
    main.h \
    database/dataserver.h \
    handlers/sessionhandler.h \
    network/tlpacket.h \
    units/player.h \
    units/game.h \
    utils/logger.h \
    utils/Config.h \
    utils/ccreader.h \
    ccmd/commandmanager.h \
    crypto/loginhelper.h \
    crypto/zlibhelper.h \
    shared/common.h \
    server/udpsever.h \
    server/logonserver.h \
    server/clientsocket.h \
    utils/configfile.h
